
import etxt2db.api.ClassificationExecutor;
import etxt2db.api.ClassificationEvaluator;
import etxt2db.api.ClassificationModel;
import etxt2db.api.ClassificationModelCreator;
import etxt2db.features.CharacterFeatureClassifier;
import etxt2db.features.EditableTokenFE;

import java.io.*;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class TestClassificationOperators {
	
	public static void main(String[] args) throws Exception {
		String teste = "[";

		List<String> attributes = new ArrayList<String>();
		attributes.add("location");
		attributes.add("speaker");
		attributes.add("etime");
		attributes.add("stime");
		//attributes.add("title");

			
		File trainingFile = new File("C:/Users/Goncalo/Desktop/Corpus HTML/train");
		
		File testingFile = new File("C:/Users/Goncalo/Desktop/Corpus HTML/test");

		
		ClassificationModelCreator trainer = new ClassificationModelCreator();
		trainer.setBeginTag("[");
		trainer.setEndTag("]");
		ClassificationModel annotator = trainer.trainMachineLearningModel(trainingFile,ClassificationModelCreator.MLTechnique.HMM,null);
		
		ClassificationExecutor tester = new ClassificationExecutor();
		tester.setBeginTag("[");
		tester.setEndTag("]");
		tester.printClassificationResults(testingFile,annotator, null);
		
		ClassificationEvaluator tester2 = new ClassificationEvaluator();
		tester2.setBeginTag("[");
		tester2.setEndTag("]");
		tester2.printEvaluationReport(testingFile,annotator, null);
	}

}